package com.cqr.studentmanager.util;

/**
 * @Classname SnGenerateUtil
 * @Description 随机生成学号
 * @Date 2019/6/27 20:17
 * @Created by Cqrrrrrrrr
 */
public class SnGenerateUtil {
    public static String generateSn(int clazzId){
        String sn = "";
        int max=200,min=1;
        long randomNum = System.currentTimeMillis();
        int ran3 = (int) (randomNum%(max-min)+min);
        System.out.println(ran3);
        sn = "20181316"+clazzId+ran3;
        return sn+1;
    }
    public static String generateTeacherSn(int clazzId){
        String sn = "";
        long randomNum = System.currentTimeMillis();
        int max=200,min=1;
        int ran3 = (int) (randomNum%(max-min)+min);
        System.out.println(ran3);
        sn = "20181316"+clazzId+ran3;
        return sn+1;
    }
}
